﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using Googler.BLL;

namespace Googler.Web
{
    public partial class IncreaseBuildNumber : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string path = Server.MapPath("~/BuildInfo.txt");

            var fs = File.Create(path);
            var sw = new StreamWriter(fs);
            try
            {
                string lastUpdated = DateTime.Now.ToString();
                sw.Write(lastUpdated);
                Sessions.SiteLastUpdatedAt = lastUpdated;

            }
            finally
            {
                sw.Close();
                fs.Close();
            }

        }
    }
}